const CDN = "http://files.fujin8.com/"
const SSLCDN = "https://cdn.fujin8.com/"

export default function (key, size, ssl = false) {

  let server = ssl ? SSLCDN : CDN

  //判断是数组还是字符串
  if (Array.isArray(key)) {
    let copy = []
    for (let i = 0; i < key.length; i++) {
      copy[i] = key[i] = server + key[i]
      if (size) {
        key[i] += "-" + size
      }
    }
    return copy
  } else {
    if (size) {
      return server + key + "-" + size
    }
    return server + key
  }

}